<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script>
    //.length-------->字符串的长度
    var str = "你别是个傻子吧";
    console.log(str.length);
    //indexOf(要找的字符串，从某个位置开始的索引)；返回的是这个字符串的索引值，没找到则返回-1；
    var str = "小红小苏小黄小黑小白";
    //replace("旧的字符","新的字符");
    var str = "你喜欢我";
    str = str.replace("你", "我");
    console.log(str);
    //slice(开始的索引，结束的索引前一位);
    var str = "如果有一天世界末日了，请记得别忘了我";
    str = str.slice(5, 10);
    console.log(str)


</script>
</body>
</html>